package dubbo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.annotation.PropertySource;

/**
 * Hello world!
 *如果以war包发布的话需要继承  extends SpringBootServletInitializer 类才能在其他web容器中运行
 */
@SpringBootApplication
@PropertySource(value = {"classpath:job.properties"})
@ImportResource(value = { "classpath:dubbo.xml" })
public class App2 extends SpringBootServletInitializer {
/**
 * 使用整合Spring boot框架启动服务，并调用其他两个服务server1和server2
 * @param args
 */
	public static void main(String[] args) {
		SpringApplication.run(App2.class, args);
		System.out.println("===============================================================================");
		System.out.println("============= APP2 Started ON SpringBoot Success FOR dubbo.server2=============");
		System.out.println("===============================================================================");
	}
}
